Skip to content


ai  101  pytorch  classification  nvidia  cuda  install  tensorrt  yolo  ardupilot  None  ros2  dds  micro ros  xrce  sitl  plugin  SITL  debug  rangefinder  pymavlink  mavros  gazebo  distance sensor  system_time  timesync  cmake  gtest  ctest  cpp  c++  format  fmt  multithreading  spdlog  camera  coordinate system  orb  matching  opencv  build  transformation  computer vision  homography  optical flow  of  trackers  cv  cyclonedds  eprosima  fastdds  simulation  config  ignition  bridge  sdf  tips  ign-transport  sensors  lidar  aptly  apt  encryption  pgp  docker  git  bundle  github  hooks  pre-commit  lxd  container  lxc  x11  profile  vscode  marpit  presentation  marp  markdown  mermaid  video  ffmpeg  gstreamer  cheat-sheet  sdp  v4l2loopback  gi  snippets  cheat Sheet  python  asyncio  future  click  cli  numpy  project  template  black  isort  docs  project document  docstrings  flake8  linter  git-hook  mypy  unittest  pytest  pylint  mock  iterator  generator  logging  tuple  namedtuple  typing  annotation  pyzmq  zmq  msgpack  action  namespace  remap  control2  ros2_control  gdb  qos  tag  plugins  msg  node  zero-copy  shm  tutorial  algorithm  calibration  diff  pid  dev  colcon  colcon_cd  rpi  arm  qemu  settings  behavior  plot  visualization  debugging  diagnostic  diagnostics  tutorials  gst  math  apm  rat_runtime_monitor  web  rosbridge  vue  binding  discovery  gazebo-classic  launch  spawn  cook  gps  imu  ray  gazebo_ros_ray_sensor  ultrsonic  range  ultrasonic  gazebo classic  wrench  effort  odom  ign  gz  xacro  ros_ign  diff_drive  odometry  joint_state  argument  OpaqueFunction  DeclareLaunchArgument  LaunchConfiguration  tmux  nav  slam  test  rclpy  executor  MultiThreadedExecutor  SingleThreadedExecutor  param  dynamic-reconfigure  service  client  setup.py  package.xml  parameter  parameters  custom  msgs  executers  pub  sub  rqt  rviz  rviz2  pose  marker  tf2  deb  package  setup  local_setup  rosdep  package manager  project settings  vcstool  cross-compiler  nano  texture  tmuxp  rootfs  embedded  zah  linux  rm  ubuntu  ip  ss  network  netstat  snap  deploy  ssh  systemd  mkdocs  extensions  socat  networking  serial  udp  tc  mtu  select  px4  robotics  kalman_filter  kalman  filter  control  todo  vscode-ext  json  yaml  schema  yocto  poky  world  gazebo_ros2_control  position_controller  effort_controller  velocity_controller  urdf  gazebo_ros_force  gazebo_ros_joint_state_publisher  robot_state_publisher  joint_state_publisher  projects  vrx  buoyancy 

ROS2 package develop

package from code to deploy


Table of Content

ROS2 Package#

from code to deploy#


ROS2#

bg left:45%

Robot Operating System (ROS) is an open-source robotics middleware suite. Although ROS is not an operating system (OS) but a set of software frameworks for robot software development (wikipedia)


ROS2#

  1. How to resolve the robotic problem
  2. Why of thinking
  3. Think only on your’s.
  4. Standard. Standard. Standard.
  5. Community

ROS2 Framework#

  1. Nodes / Process
  2. Communication (DDS)
  3. Tools (rqt, bag, ..)
  4. ECO System (diagnostics, logging, allot of packages)
  5. Standard. Standard. Standard.


Verbs#

  • Package
  • Nodes
  • Topics
  • Pub
  • Sub
  • Service
  • Action
  • Parameters
  • Messages

Code to Deploy#

let’s start#


AXE and other tools#

“Give me six hours to chop down a tree and I will spend the first four sharpening the axe” (Abraham Lincoln)

  • Dev environment
  • VSCode

Package from code to deploy#

  • Requirements analysis
  • Design
  • Coding

Continue …#

  • Code quality
  • Tests
  • Linters
  • Static and Dynamic analyze
  • Source Control
  • Documents
  • Package Version
  • Deploy
  • CI / Maintenance

Language#

  • Python (3.10)
  • CPP (C++17)
  • CMAKE
  • XML / yaml / json / schema
  • BASH
  • GIT
  • Network
  • Physics and Simulation
  • Markdown

Dev Environment#

  • GIT
  • VSCode
  • Extensions
  • ROS2
  • Docker
  • Network and diagnostic tools

VSCode#

  • Python
  • autoDocstring
  • pylint, pylance
  • Git
  • Git Graph
  • Git Lance

VSCode more Extensions#

  • Other
  • xml
  • xml tools
  • yaml
  • Helper
  • tabout
  • draw.io
  • project manager
  • Code spell checker

Demo Time#

Simple python package from code to deploy

  • Requirements and Design
  • Code
  • Code Quality
  • Source Control
  • Versioning
  • Dependencies
  • Deploy

Demo#

Optical Flow simple tracker


Design#

4 Nodes - Image source - test - camera - Tracker - Viewer and controller


Topic and messages#


Code Quality#

Take time but pay off in the long run#

  • Type hinting
  • Formatters
  • Linters
  • Test (pytest)
  • unit test
  • integration test
  • Commit / Pre-commit

Type hinting#

Type hint should be use whenever unit test are worth writing

They help you as a developer write better code


Linters#

A linter is a tool to help you improve your code

  • Fewer errors in production
  • Readable, maintainable, consistent code
  • Code Style (no endless arguments)
  • More secure and performant code

Linters tools#

  • Pylint
  • Flake8
  • mypy

GIT#

  • branching strategy
  • commit
  • tag
  • merge request

branching strategy#


GIT helping tools#

  • GIT cli
  • VSCode
  • Builtin
  • GitLens
  • Git Graph

Thinks that left out#

bg left:33% - C++ - Cross Compiler - Simulation - CI/CD - Docker and Dev container